package com.lyf.scm.admin.domain.remote.allocationservice;

import com.github.pagehelper.PageInfo;
import com.lyf.scm.admin.api.dto.EsAggregationDTO;
import com.lyf.scm.admin.api.dto.EsReturnDTO;
import com.rome.arch.core.clientobject.Response;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * es懒加载查询解决方案
 *
 * @author wangchlei
 * @date 2020/11/14
 */
@FeignClient(name = "scm-plan-service")
public interface SalesPlanEsLazyLoadingRemote {
    @PostMapping("/api/v1/lazyLoading/query")
    Response<PageInfo<EsReturnDTO>> pageQuery(@RequestBody EsAggregationDTO esAggregation);

    @PostMapping("/api/v1/lazyLoading/export")
    Response<List<EsReturnDTO>> queryFromCache(@RequestBody EsAggregationDTO esAggregationDTO);
}
